package com.matrix.kernel.controller.module;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.matrix.kernel.core.service.ModuleService;
import com.matrix.kernel.util.PageUtils;
import com.matrix.kernel.util.R;

/**
 * 
 * 程序系统调用
 * 
 * @author wubo
 *
 */
@Controller
@RequestMapping("/module")
public class ModuleController {

	@Autowired
	ModuleService moduleService;
	
	/**
	 * 模块 -> 获取模块列表
	 * 
	 * @param params
	 * @return
	 */
	@RequestMapping("/list")
	@ResponseBody
	public R list(@RequestParam Map<String, Object> params){
		PageUtils pageUtil = moduleService.getModules(params);
        return R.ok().put("data", pageUtil);
	}
}
